<?php
if (!defined('APP')) {
    die('error');
}

require_once 'Db.php';
require_once 'Txt.php';
require_once 'Curl.php';
require_once 'File.php';
require_once 'Image.php';
require_once 'AccessToken.php';

//基类
class Base
{

    public function __construct()
    {
        //echo __class__.__function__.'<hr/>';
    }

    public $image = '';
    public $db = '';

    //监听类函数调用
    public function start()
    {
        if (isset($_REQUEST['f'])) {
            $f = $_REQUEST['f'];
            $this->$f();
        } else {
            echo __class__ . ' ' . __function__;
        }
    }

    //获取数据库链接    private
    protected function getDb()
    {
        if (!$this->db) {
            $this->db = new Db();
        }
    }
}
